package com.tpfinal.agenda.view.renderers;

class FilterAll extends Filter {

	public FilterAll(ContactsTableModel model) {
		super(model);
	}

	@Override
	void render(String stringFilter) {
		for (ContactViewAdapter viewAdapter : model.getContactsListView()) {
			viewAdapter.setVisible(viewAdapter.getAdaptee().getName().toLowerCase()
					.contains(stringFilter.toLowerCase()));
		}

		showColumn(6, true);
		showColumn(7, true);
		showColumn(8, true);
		showColumn(9, true);

		this.stringFilter = stringFilter;
		model.refresh();
	}

}
